package org.example.weboj.handler;

import lombok.Data;

@Data
public class OutgoingMessage {
    private String type;     // "chat", "code"
    private String subtype;  // "system", "error", "user"
    private Object content;  // 既可以是字符串消息，也可以是 delta 对象
    private String codeHash;
    private String masterId;
    private Message.Cursor cursor;
    private String clientId;


    public OutgoingMessage(String type, String subtype, Object content, String codeHash, String masterId, Message.Cursor cursor, String clientId) {
        this.type = type;
        this.subtype = subtype;
        this.content = content;
        this.codeHash = codeHash;
        this.masterId = masterId;
        this.cursor = cursor;
        this.clientId = clientId;
    }

    public OutgoingMessage(String type, String subtype, Object content) {
        this.type = type;
        this.subtype = subtype;
        this.content = content;
    }
}
